<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>{$page_title}</h5>
                    <div class="ibox-tools">
                        <a href="javascript:void(0);" class="btn btn-xs btn-default btn-help-detail"  data-type="cst_customer"> <i class="fa fa-question-circle"> 操作说明</i></a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <form id="pagerForm" method="post" class="form-inline searchForm">
                            <input name="workflow_id" type="hidden" value="{$workflow_id}">
                            <div class="col-sm-12">
                                <div class="input-group">
                                    <input type="text" name="keywords" placeholder="输入关键字搜索" class="form-control">
                                </div>
                                <div class="input-group">
                                    <span class="input-group-btn"> <button type="button" class="btn btn-primary ajaxSearchForm"><i class="fa fa-search"></i> 搜索</button></span>
                                </div>
                                <div class="input-group">
                                    <span class="input-group-btn"> <button type="button" class="btn btn-warning ajaxSearchForm resetForm"><i class="fa fa-recycle"></i> 重置</button></span>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-10">
                            <lqf_link><a class="btn btn-success btn-history"  data-url="{:url('Workflow/add')}"><i class="fa fa-history"></i> 返回</a></lqf_link>
                            <lqf_link><a class="btn btn-info ajax-open"  data-url="{:url('WorkflowNode/add',array('workflow_id'=>$workflow_id))}"><i class="fa fa-plus"></i> 添加</a></lqf_link>
                        </div>
                        <div class="col-sm-2 text-right">
                            <a href="javascript:void(0);" class="btn btn-default btn-outline btn-field-set" data-id="{$page_title|default=''}"> <i class="fa fa-columns"></i> 列</a>
                        </div>
                    </div>
                </div>
                <div class="ibox-content table-responsive">
                    <table class="table table-hover sorttable ajax-list-table" data-url="{:url('WorkflowNode/show_json')}" width="100%">
                        <thead>
                        <tr>
                            <th width="50"><span>执行步骤</span></th>
                            <th width="100"><span>节点名称</span></th>
                            <th width="100"><span>分配类型</span></th>
                            <th width="200"><span>审批人员</span></th>
                            <th width="80"><span>排序</span></th>
                            <th width="80">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                        <tfoot class="ibox-content">
                        <tr>
                            <td colspan="6" align="center"></td>
                        </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script id="tableListTpl" type="text/html">
    <% for(var i=0;i<data.length;i++) {
    var step=i+1;
    %>

    <tr>
        <td><span class="label label-success"><%=step%></span></td>
        <td><%=data[i]['name']%></td>
        <td><%=data[i]['destribute_type_name']%></td>
        <td><%=data[i]['destribute_user_name']%></td>
        <td>
            <input type="text" name="sort" value="<%=data[i]['sort']%>" class="form-control w50 ajax-sort" data-url="{:url('WorkflowNode/set_sort',array('name'=>'sort'))}" data-id="<%=data[i]['id']%>" size="5">
        </td>
        <td>
                <lqf_link><a class="ajax-open" data-url="{:url('WorkflowNode/edit')}"  data-ids="{'id':'<%=data[i]['id']%>'}"><i class="fa fa-edit"></i>修改</a></lqf_link>
                <lqf_link><a class="ajax-del confirm" data-url="{:url('WorkflowNode/del')}" data-ids="{'id':'<%=data[i]['id']%>'}"><i class="fa fa-remove"></i>删除</a></lqf_link>
        </td>
    </tr>
    <% } %>
</script>
<script type="text/javascript">
    $(document).ready(function () {
        turnPage(1);//页面加载时初始化分页
    });
</script>